<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="java.io.*"%>
<%@ page import="java.sql.*"%>
<%@ page import="java.util.*"%>
<%@ page import="java.text.*"%>
<%@ page import="javax.sql.*"%>
<%@ page import="com.gzgi.framework.*"%>
<%@ page import="com.gzgi.framework.util.*"%>
<%@ page import="com.gzgi.framework.context.*"%>
<%@ page import="com.gzgi.framework.config.*"%>
<%@ page import="com.gzgi.form.metadata.*"%>
<%
       //http://localhost:8080/jbpm/pages/test/testMeta.jsp?file=C:/jpage2007/gzgi-jbpm/doc/form-metadata.xml
       InputStream inputStream = new FileInputStream(request.getParameter("file"));
		MetadataXmlReader reader = new MetadataXmlReader();
		Map nodeMap = reader.read(inputStream);
		//System.out.println(nodeMap);
		MetadataService metadataService = (MetadataService) ContextFactory.getBean("metadataService");
		metadataService.saveAll(nodeMap);
        System.out.println(metadataService.getMetadata("2.1"));
 %>